<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp"%>
<html>
<head>
<title></title>
<link href="${backPath}/images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}

.STYLE1 {font-size: 12px}
.STYLE4 {
	font-size: 12px;
	color: #1F4A65;
	font-weight: bold;
}

a:link {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;

}
a:visited {
	font-size: 12px;
	color: #06482a;
	text-decoration: none;
}
a:hover {
	font-size: 12px;
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	font-size: 12px;
	color: #FF0000;
	text-decoration: none;
}
.STYLE7 {font-size: 12}

-->
</style>
<script type="text/javascript" language="javascript">
var  highlightcolor='#E6EDF2';
var  clickcolor='#51b2f6';
function  changeto(){
source=event.srcElement;
if  (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs  =  source.children;
//alert(cs.length);
if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor=highlightcolor;
}
}

function  changeback(){
if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
	cs[i].style.backgroundColor="";
}
}

function openMerch(Id){
	window.open("viewCon_Merch.action?id="+Id,"top");
}
//删除卡户信息
function delCust(id){
	if(confirm("您确认要删除本条卡户信息吗？")){
		location.href = "del_Cus.action?id=" + id;
	}	
}
//初始化卡户密码
function initPwd(id){
	if(confirm('确认初始化本卡户的密码吗？')){
		location.href = 'initPass_Cus.action?id=' + id;
	}
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="${backPath}/images/mail_leftbg.gif"><img src="${backPath}/images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="${backPath}/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">卡户信息</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="${backPath}/images/mail_rightbg.gif"><img src="${backPath}/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="${backPath}/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="30"><img src="${backPath}/images/list/tab_031.gif" width="15" height="30" /></td>
        <td width="951" background="${backPath}/images/list/tab_051.gif"><img src="${backPath}/images/list/311.gif" width="16" height="16" /> <span class="STYLE4">卡户列表</span></td>
        <td width="281" background="${backPath}/images/list/tab_051.gif">
	<form action="search_Cus.action" method="post" id="search">
        	<div align="center" class="STYLE2 STYLE1">
            卡号：      
            <input name="merch.codeno"  type="text" id="mname"  style="height:15px;width:120px">
            <input type="button" name="button" id="button" onclick="searchCus()" value="查询">
     </form>
    <script type="text/javascript">
    function searchCus(){
        /*if(document.getElementById("mname").value==""){
            alert("卡号不能为空！");
            return false;
            }else{*/
                document.getElementById("search").submit();
                //}
        }
    </script>
          </div>
          </td>
        <td width="14"><img src="${backPath}/images/list/tab_071.gif" width="14" height="30" /></td>
      </tr>
    </table></td>

  </tr>

  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" background="${backPath}/images/list/tab_121.gif">&nbsp;</td>
        <td bgcolor="#EEF2FB"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#9EAEB9" onMouseOver="changeto()"  onmouseout="changeback()">
          <tr>
            <td width="6%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">编号</div></td>
            <td width="16%" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">卡号</div></td>
            <td width="16%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2 STYLE1">卡户地址</div></td>
            <td width="14%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">联系电话</div></td>
            <td width="18%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">查看详细</div></td>
            <td width="6%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">状态</div></td>
            <td width="10%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">注销</div></td>
            <td width="14%" height="26" background="${backPath}/images/list/tab_141.gif" class="STYLE1"><div align="center" class="STYLE2">密码初始化</div></td>
          </tr>
          <c:forEach items="${pager.resultList}" var="mer">
          <tr>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${mer.mid }</div></td>
            <td bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${mer.codeno}</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${mer.maddr }</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1">${mer.mphone }</div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="${backPath}/images/list/037.gif" alt="" width="9" height="9" /></span><span class="STYLE1" > [<a href="viewCon_Cus.action?id=${mer.mid}" target="_blank" >查看</a></span><span class="STYLE1">]</span></div></td>
            <td align="center" bgcolor="#FFFFFF">
            <c:if test="${mer.mstat==0}">
            		<span class="STYLE1" > 正常</span>	
            </c:if>
            <c:if test="${mer.mstat==1}">
            			<span class="STYLE1" >已锁定</span>
            </c:if>
         </td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="${backPath}/images/list/010.gif" alt="" width="9" height="9" /></span><span class="STYLE1"> [<a href="javascript:delCust(${mer.mid})" >注销</a></span><span class="STYLE1">]</span></div></td>
            <td height="18" bgcolor="#FFFFFF"><div align="center"><span class="STYLE2"><img src="${backPath}/images/list/010.gif" alt="" width="9" height="9" /></span><span class="STYLE1"> [<a href="javascript:initPwd(${mer.mid});"  >密码初始化</a></span><span class="STYLE1">]</span></div></td>
          </tr>
          </c:forEach>
     	  <tr>
           <td colspan="8" height="18" bgcolor="#FFFFFF" align="center">
           	<font color="blue" style="font-size:12px;"><s:actionmessage/></font>
           </td>
          </tr>   
        </table></td>
        <td width="9" background="${backPath}/images/list/tab_161.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="29"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="15" height="29"><img src="${backPath}/images/list/tab_201.gif" width="15" height="29" /></td>
        <td background="${backPath}/images/list/tab_211.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25%" height="29" nowrap="nowrap"><span class="STYLE1">共${pager.rowCount}条纪录，当前第${pager.pageNo}/${pager.pageCount}页，每页${pager.pageSize}条纪录</span></td>
            <td width="75%" valign="top" class="STYLE1"><div align="right">

              <table width="352" height="20" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="62" height="22" valign="middle"><div align="right"><a href="list_Cus.action?pageNo=${pager.firstPageNo}"><img src="${backPath}/images/list/first1.gif" width="39" height="17"/></a></div></td>
                  <td width="50" height="22" valign="middle"><div align="right"><a href="list_Cus.action?pageNo=${pager.prePageNo}"><img src="${backPath}/images/list/back1.gif" width="45" height="17" /></a></div></td>
                  <td width="54" height="22" valign="middle"><div align="right"><a href="list_Cus.action?pageNo=${pager.nextPageNo}"><img src="${backPath}/images/list/next1.gif" width="45" height="17" /></a></div></td>
                  <td width="49" height="22" valign="middle"><div align="right"><a href="list_Cus.action?pageNo=${pager.lastPageNo}"><img src="${backPath}/images/list/last1.gif" width="39" height="17" /></a></div></td>
                  <td width="59" height="22" valign="middle"><div align="right">转到第</div></td>
                  <form action="list_Cus.action" method="post" name="listForm">
                  <td width="25" height="22" valign="middle"><span class="STYLE7">
                   <input  type="text" class="STYLE1" style="height:15px; width:25px;" size="5" name="pageNo"/>
                  </span></td>
                  <td width="23" height="22" valign="middle">页</td>
                  <td width="30" height="22" valign="middle"><img src="${backPath}/images/list/go1.gif" width="39" height="17" onclick="listForm.submit();"/></td>
                   </form>
                </tr>
              </table>
            </div></td>
          </tr>
        </table></td>
        <td width="14"><img src="${backPath}/images/list/tab_221.gif" width="14" height="29" /></td>
      </tr>
    </table></td>
  </tr>
</table></td>
    <td background="${backPath}/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="${backPath}/images/mail_leftbg.gif"><img src="${backPath}/images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="${backPath}/images/buttom_bgs.gif"><img src="${backPath}/images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="${backPath}/images/mail_rightbg.gif"><img src="${backPath}/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
</html>